package com.doubao.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.doubao.entity.SmartDevice;
import com.doubao.entity.SmartDeviceTag;
import com.doubao.entity.dto.SmartDeviceCreateDTO;
import com.doubao.entity.vo.SmartDeviceVO;
import java.util.List;

public interface SmartDeviceService extends IService<SmartDevice> {

    /**
     * 创建智能体
     */
    SmartDevice createDevice(SmartDeviceCreateDTO dto, Long userId);

    /**
     * 收藏智能体
     */
    void collectDevice(Long userId, Long deviceId);

    /**
     * 取消收藏
     */
    void uncollectDevice(Long userId, Long deviceId);

    /**
     * 查询用户的智能体列表
     */
    List<SmartDeviceVO> listUserDevices(Long userId);

    /**
     * 分页查询公开智能体
     */
    IPage<SmartDeviceVO> pagePublicDevices(Page<SmartDevice> page, String category);

    /**
     * 检查访问权限
     */
    void checkDeviceAccess(Long userId, Long deviceId);

      /**
     * 更新智能体标签
     */
    void updateDeviceTags(Long deviceId, List<String> tagNames);

    /**
     * 获取智能体标签
     */
    List<String> getDeviceTags(Long deviceId);

    /**
     * 获取热门标签
     */
    List<SmartDeviceTag> getHotTags(int limit);
}